import api from '@/libs/api';
import http from '@/axios/http';
export default {
  apiHealthEdit(state,options){
    state.apiHealth=options;
  },
  isBuyEdit(state,fn){
    http(api.health_checkbuy).then(res=>{
      switch(parseInt(res.data.ret,10)){
        case 0:
          state.isBuy=res.data.data.state*1;
          if(fn){
            fn();
          }
          break;
        default:
          Toast(res.data.msg);
      }
    });
  },
  popShowEdit(state,options){
    state.popShow=options;
  },
  forcodeEdit(state,options){
    state.forcode=options;
  }
}
